package com.tang.enums;

public enum AppHttpCodeEnum {
    // 成功
    SUCCESS(200,"操作成功"),
    // 登录
    NEED_LOGIN(401,"需要登录后操作"),
    NO_OPERATOR_AUTH(403,"无权限操作"),
    SYSTEM_ERROR(500,"出现错误"),
    USERNAME_EXIST(501,"用户名已存在"),
    PHONENUMBER_EXIST(502,"手机号已存在"), EMAIL_EXIST(503, "邮箱已存在"),
    REQUIRE_USERNAME(504, "必需填写用户名"),
    LOGIN_ERROR(505,"用户名或密码错误"), CONTENT_NOT_NULL(505,"评论不能为空" ),
    FILE_TYPE_ERROR(506, "图片类型错误"),
    USERNAME_NOT_NULL(507,"用户名不能为空"),
    NICKNAME_NOT_NULL(508,"昵称不能为空"),
    PASSWORD_NOT_NULL(509,"密码不能为空"),
    EMAIL_NOT_NULL(510,"邮箱不能为空"),
    NICKNAME_EXIST(511,"昵称已存在"),
    USER_NOT_LOGGED_IN(400, "用户没有登录，无法评论"),
    USER_EMAIL(512,"用户名或邮箱错误"),
    SUCCESS_PASSWORD(400,"修改密码成功"),
    REQUIRE_USERCODE(405, "必须传入验证码"),
    CAPTCHA_ERROR(400, "验证码输入错误"),
    TALK_STATUS(513, "状态输入错误"),
    INVALID_PARAM(514,"状态不能为空" ),
    USER_FORBIDDEN(515,"用户已禁止登录，请联系管理员！" ),
    DATABASE_UPDATE_ERROR(516,"图片删除失败" ),
    USERNAME_CONTAINS_CHINESE(517,"用户名不能为中文字体" );
    public static final String CODEERROR = "验证码错误";
    int code;
    String msg;

    AppHttpCodeEnum(int code, String errorMessage){
        this.code = code;
        this.msg = errorMessage;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}

